﻿@model List<PokerBet.Areas.AdminPanel.Models.RoundAndWinner>

@{
    Layout = null;
}


<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>Start</title>
    <link href="/Content/Site.css" rel="stylesheet" type="text/css" />
    <link href="/Content/admin.css" rel="stylesheet" type="text/css" />
    <script src="/Scripts/jquery-1.5.1.min.js" type="text/javascript"></script>
    <script src="/Scripts/jquery.validate.min.js" type="text/javascript"></script>
    <script src="/Scripts/jquery.validate.unobtrusive.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $('input[name="[0].Round"]').blur(function () {
                firstRound = this.value;
                $('input[name*="Round"]').each(function (idx, val) {
                    $(val).val(++firstRound);
                });

//                $('input[name*="Winners"]').each(function (idx, val) {
//                    $(val).val("12,24,34");
//                });
            });

            $('#stop').click(function () {
                if (confirm("Stop?"))
                {
                    $.get("@Url.Action("Stop", "Dashboard")", function (data) {
                     
                    });
                }
            });
        });
    </script>
</head>

<body onload="resize()" style="overflow:auto;background: #075A08;">
        <div class="tablesa" style=" margin: 40px auto;">
      	<div id="tblResults" style="height: 240px; width:410px;">

        @using (Html.BeginForm())
        {        
            @Html.ValidationSummary(true)

		    <table  id='historyTable' border=0 width=100% class="roundWinners" cellspacing=0 cellpadding=0 style="">
                @for (int i = 0; i < 8; i++)
                {
                    <tr>
				        <td class="tdRound" round=8 align="left">
                            @Html.EditorFor(m => m[i].Round)
                        </td> 
                        <td class="tdWinner" round=8>
                            @Html.TextBoxFor(m => m[i].Winners)
                        </td>
			        </tr>   
                }			                   			    
		    </table>  
            
            <input type="submit" id="start" name="start" value="Start" />     
            <input type="Button" name="stop" value="Stop" id="stop" />     
        }

	    </div>
    </div>
</body>
</html>
